﻿var isFistPlay = "no"; //是否第一次播放
var ThemeVale;          //保存主题婚礼的选择
var ThemName;
//var IsRuning = '0';     //保存是否正在数据交换
$(document).ready(function () {

    $(".shoppcar").css("background-color", "#c75f3e");
    $('#sideBarTab').click(function () {         //左侧导航 
        var leftVale = $('#sideBarContentsInner').offset().left;
        if (leftVale < 0) {
            $('#sideBarContentsInner').animate({ left: "+=300px" }, 700);
            $('#sideBarTab').animate({ left: "+=300px" }, 700);
        } else {
            $('#sideBarContentsInner').animate({ left: "-=300px" }, 700);
            $('#sideBarTab').animate({ left: "-=300px" }, 700);
        }
    });
    // $(".linktitle").click(function () { $(".linkwindow").slideUp(); });   //我的链接
    $(".remindertitle").click(function () { $(".reminderpage").slideUp(); });  //提醒
    var varThis = $(".shopcar");
    // $(".classimage").insetBorder();
    varThis.click(function () {
        // changeIcon(varThis);
        $(".shopcarconection").slideToggle("slow");
    });
    //    //给数据装载中的节点定义ajax事件，实现动画提示效果
    //    $(".pagecount").ajaxStart(function () {
    //        $("#loading").slideDown();
    //    }).ajaxStop(function () {
    //        $("#loading").slideUp(); 
    //    });
    // IsRuning = '1';
    $(".pagecount").load("CustomizeView.aspx  #container", { "id": "3" }, function () { getSearch('3'); });
    //palyFistFile('3');
    //获得原始数据
    getShopCar();
    $.ajaxSetup({
        cache: false //关闭AJAX相应的缓存
    });

    //从Cookie中获得已选择项目

    //获得项目选择菜单

    $.ajax({
        cache: "False",
        type: "GET",
        cache: "False",
        url: "GetSearchIndex.ashx",
        success: function (obj) {
            $("#sideBarContentsInner").html(obj);
        },
        error: function (xhr, ajaxOptions, thrownError)
        { alert("网络异常，稍后重试！"); return false; }
    });


    //填出订单div的大小
    var width = document.body.offsetWidth;
    var varTemp = (width - 1216) / 2;

    var height = $(window).outerHeight(true);

    $(".addPage").css("left", varTemp - 20);
    $(".MinusPage").css("left", 1216 + varTemp+23);

    $(".addPage").css("top", height / 2);
    $(".MinusPage").css("top", height / 2);

    $(".addPage").css("position", "fixed");
    $(".MinusPage").css("position", "fixed");

    $(".addPage").css("position", "pointer");
    $(".MinusPage").css("position", "pointer");

    $(".addPage").css("width", "40");
    $(".addPage").css("height", "60");
    $(".MinusPage").css("width", "40");
    $(".MinusPage").css("height", "60");

    $('.addPage').click(function () {
        getNextPage('-1');
    });
    $('.MinusPage').click(function () {
        getNextPage('1');
    });

    $(".orderPage").css("width", 1024);
    $(".orderPage").css("left", (width - 1024) / 2);
    $(".orderPage").css("height", height - 200);
    // $(".pagecount").hAlign();
    $(".pagecount").css("left", (width - 1300) / 2 + 40)
    //$(".sideBar").css("top", height / 2);
    $(".gv_frame").css("border", "5px");
    $(".gv_frame").css("border-bottom-color", "#C2C1B9");
    Init();
    changBackColor('3');

    $("#allsortlist").css("right", -4);
    // $(".getsechitem").css("right", width - 28);
    isFistPlay = "no";
    //$("#countList").css("left",20);
});

(function ($) {
    $.fn.hAlign = function () {
        return this.each(function (i) {
            var w = $(this).width();
            var ow = $(this).outerWidth();
            var ml = (w + (ow - w)) / 2;
            $(this).css("margin-left", "-" + ml + "px");
            $(this).css("left", "50%");
            $(this).css("position", "absolute");
        });
    };
})(jQuery);
(function ($) {
    $.fn.vAlign = function () {
        return this.each(function (i) {
            var h = $(this).height();
            var oh = $(this).outerHeight();
            var mt = (h + (oh - h)) / 2;
            $(this).css("margin-top", "-" + mt + "px");
            $(this).css("top", "50%");
            $(this).css("position", "absolute");
        });
    };
})(jQuery);
//播放开始视频
function palyFistFile(type) {
    $.ajax({
        type: "GET",
        url: "GetFistFile.ashx?type=" + type,
        success: function (obj) {
            if (obj != "") {
                if (obj == "SessionTimeout") {
                    IsReLogin();
                }
                else {
                    var varViewClose = $(".view");
                    isFistPlay = "yes";
                    varViewClose.css("padding-top", '0');
                    varViewClose.css("padding-left", '0');
                    varViewClose.css("padding-right", '0');
                    GetView('-1', obj, '');
                    varViewClose.click(function () {
                        CloseDiv();

                    });
                }
            }
        },
        error: function (xhr, ajaxOptions, thrownError)
        { alert(thrownError); flag = true; return false; }
    });
}

//页面大小改变事件
function changeWindow() {
    var width = document.body.offsetWidth;
    var varTemp = (width - 1216) / 2;

    var height = $(window).outerHeight(true);

    $(".addPage").css("left", varTemp - 20);
    $(".MinusPage").css("left", 1216 + varTemp);

    $(".addPage").css("top", height / 2);
    $(".MinusPage").css("top", height / 2);

    $(".addPage").css("position", "fixed");
    $(".MinusPage").css("position", "fixed");

    $(".addPage").css("position", "pointer");
    $(".MinusPage").css("position", "pointer");

    $(".addPage").css("width", "40");
    $(".addPage").css("height", "60");
    $(".MinusPage").css("width", "40");
    $(".MinusPage").css("height", "60");
}

//页面跳转
function ChangePage(strUrl, strID) {

    // palyFistFile(strID);
    $("#allsortlist").html("");
    $(".pagecount").load(strUrl + " #container", { "id": strID }, function () { getSearch(strID); });
    changBackColor(strID);

}
//改变跳转标题

function changBackColor(varType) {
    var Title = "xlimage" + varType;
    $("img").css("background-color", "");
    $("#" + Title).css("background-color", "Black");

}

// cookies   项目ID|数量,
//选择项目时改变购物车数据
//CheckValue 是projectID
function EditShopCarValue(CheckValue) {
    var GetCValue = getCookieValue("shopcar");
    var NumberValue = GetNumByproject(CheckValue);
    var cookVal = CheckValue + "|" + NumberValue + ","

    if (GetCValue.indexOf(CheckValue + "|") == -1) {  //不存在

        GetCValue = GetCValue + cookVal;
        setCookie("shopcar", GetCValue, 1, "/");
        //添加一行
        // var url = "GetShop.ashx?type=one&ids=" + CheckValue;
        //  $.get(url, addtr, "json");
        getShopCar();
    } else {
        //更新一行
        var tdid = "#tr" + CheckValue;
        //deltr(CheckValue);
        $(tdid).children("td").eq(3).html(NumberValue);
        var oldValue = GetCookiesValue(CheckValue);
        GetCValue = GetCValue.replace(oldValue, cookVal);
        setCookie("shopcar", GetCValue, 1, "/");
    }
    sumProject();
    alert("操作成功！");
}
//获得购物车数据
function getShopCar() {
    $("#ShopConnect").html("");
    // $(".loading").show();
    var GetCValue = getCookieValue("shopcar");
    if (GetCValue) {
        if (GetCValue != "") {
            //不存在的发送服务器请求
            var url = "GetShop.ashx?type=all&ids=" + GetProjectID(GetCValue);
            $.ajax({
                cache: "False",
                type: "GET",
                async: false,
                url: url,
                success: function (obj) {
                    for (var i = 0; i < obj.length; i++) {
                        addtr(obj[i]);
                        //  varThis.data(obj[i].ids, obj);
                    }
                },
                error: function (xhr, ajaxOptions, thrownError)
                { alert("网络异常，稍后重试！"); return false; }
            });

        }
    }
    $("#ShopConnect").html();
    if ($("#ShopConnect").html() == "") {
        //  $(".loading").hide();
        $("#ShopConnect").html("<tr align=\"center\" id='tdnull'><td>没选择项目</td></tr>")
    }
    sumProject();
}

//清空购物车
function clearShopCar() {
    if (confirm("是否清楚所有项目？")) {
        setCookie("shopcar", "", 1, "/");
        $("#ShopConnect").html("");
        $("#ShopConnect").html("<tr align=\"center\" id='tdnull'><td>没选择项目</td></tr>")
        sumProject();
    }

}
var themeUrl;     //保存主题婚礼的视频路径
//特色婚礼点击事件
function ShowTeme(title, purl, vurl, id, ourl) {
    //保存图片地址和视频地址

    $("#hidPhotoUrl").val(purl);
    $("#hidotherurl").val(ourl);
    themeUrl = vurl;
    var themeID = $("#hidThemID").val();
    var varID = "chek" + id;
    ThemName = title;
    if (id != themeID) {
        ThemeVale = "<li > <input id=\"" + varID + "\" type=\"checkbox\" value='" + title + "' onchange=\" GetTheme('" + id + "')\" /> <a onclick=\"getProjectInfo('" + varID + "','" + id + "','2') \" >" + title + "</a></li>        <a onclick='openOtherFile()'  style=\"float:right\"> 其他资料<a/>";
    } else {
        ThemeVale = "<li > <input id='" + varID + "' type=\"checkbox\" checked=\"checked\" value='" + title + "' onchange=\"GetTheme('" + id + "')\" /> <a onclick=\"getProjectInfo('" + varID + "','" + id + "','2') \">" + title + "</a> </li>         <a onclick='openOtherFile()' style=\"float:right\"> 其他资料<a/>";
    }
    var varHtml = "";
    if (varGallery != null) {
        $(".gv_panel").html("");
        $(".gv_filmstrip").html("");
        varGallery.storeImages();

        varGallery.buildGallery();
        varGallery.initImages();
        varGallery.bindActions();
    }
    GetView('0', vurl, '');


}
function openOtherFile() {
    var url = "ftp://" + $("#hidIP").val() + "/ThemeFile/" + $("#hidotherurl").val();
    window.open(url, '', '');
}

function changeToPhoto() {
    GetView('-1', themeUrl, '');

}
function changeToVideo() {
    GetView('0', '', '');

}
//特色婚礼选择
function GetTheme(ThemID) {
    var nowthemeID = $("#hidThemID").val();   //现在的主题婚礼
    var vid = "chek" + ThemID;
    if (ThemID == nowthemeID) {                //已经选择了主题婚礼
        clearShopCar();
        $("#hidThemID").val("");
        ThemeVale = "<li> <input id=\"" + vid + "\" type=\"checkbox\" value=\"" + ThemName + "\" onchange=\"GetTheme('" + ThemID + "')\" /> <a onclick=\"getProjectInfo('" + vid + "','" + ThemID + "','2') \" >" + ThemName + "</a> </li>       <a onclick='openOtherFile()' style=\"float:right\"> 其他资料<a/>";
    } else {
        var url = "GetThemeProject.ashx?id=" + ThemID;
        $.ajax({
            cache: "False",
            type: "GET",
            url: url,
            success: function (obj) {
                setCookie("shopcar", obj, 1, "/");
                getShopCar();
                $("#hidThemID").val(ThemID);
                ThemeVale = "<li> <input id=\"" + vid + "\" type=\"checkbox\" checked=\"checked\" value=\"" + ThemName + "\" onchange=\"GetTheme('" + ThemID + "')\" /> <a onclick=\"getProjectInfo('" + vid + "','" + ThemID + "','2') \">" + ThemName + "</a> </li>         <a onclick='openOtherFile()' style=\"float:right\"> 其他资料<a/>";
            },
            error: function (xhr, ajaxOptions, thrownError)
            { alert("网络异常，稍后重试！"); return false; }
        });
    }
    return false;
}

//在id为test的table的最后增加一行
function addtr(obj) {
    var NumberValue = GetCount(obj.ids + "|");
    str = "<tr id = 'tr" + obj.ids + "' style=\"width: 100px\">  <td><img onclick=\"showPFile('" + obj.ids + "')\" src=\"" + obj.image + "\" width=\"80px\" height=\"45px\" style=\"cursor:pointer\" />";
    str = str + "</td>";
    str = str + "<td style=\"width: 100px\">"
    str = str + obj.name;
    str = str + "</td>";
    str = str + "<td style=\"text-align:center;width: 40px\">" + obj.price + "</td>";
    str = str + "<td style=\"text-align:center;width: 40px\">" + NumberValue + "</td>";
    str = str + "<td style=\"text-align:center;width: 100px\">" + obj.strProjectType + "</td>";
    str = str + "<td style=\"text-align: center; color: Red;width: 50px\">"
    str = str + "<a onclick=\"deltr('" + obj.ids + "')\" style=\"cursor:pointer\">移除</a>";
    str = str + "</td></tr>";
    $('#ShopConnect').append(str);
    $("#tdnull").remove();
}

// 点击购物车查询项目图片

function showPFile(pid) {
    $(".pagecount").load("CustomizeView.aspx  #container", { "projectid": pid });

}

//删除
function deltr(removeID) {
    var GetCValue = getCookieValue("shopcar");
    GetCValue = GetCValue.replace(GetCookiesValue(removeID), "");
    setCookie("shopcar", GetCValue, 1, "/");
    //tr_id = $("#tr" + removeID + "").attr("id");
    //  var tdid = "#tr" + removeID;
    // $(tdid).remove();
    getShopCar();
    sumProject();
}
/**
* 修改购物车背景图
*/
function changeIcon(shopbg) {
    if (shopbg) {
        if (shopbg.css("background-image").indexOf("shopbg.png") >= 0) {
            shopbg.css("background-image", "url('../Images/View/shopbg2.png')");
        } else {
            shopbg.css("background-image", "url('../Images/View/shopbg.png')");
        }
    }
}
//一级查询索引页面跳转
function getPage(projectYype) {
    if ($("#hidRunState").val() == '1') {
        funMessage();
    } else {
        $("#allsortlist").html("");
        $("#hidRunState").val('1');
        $(".pagecount").load("CustomizeView.aspx #container", { "id": "3", "projecttype": projectYype }, function () { getSearch('3'); });
        changBackColor('3')
        $("#hidRunState").val('0');
    }
}

function ChangeNumber(objNumber, ProjectID) {
    var varNumber = parseInt(objNumber, 10);
    var NowNumber = parseInt($("#Number" + ProjectID).html(), 10) + varNumber;
    if (NowNumber == 0) {
        alert("数量不能为0！");
        return;
    }
    $("#Number" + ProjectID).html(NowNumber); //修改列表数量
    //修改Cookies值和购物车数量
    var GetCValue = getCookieValue("shopcar");
    var cookVal = ProjectID + "|" + NowNumber + ","
    var tdid = "#tr" + ProjectID;
    //deltr(CheckValue);
    $(tdid).children("td").eq(3).html(NowNumber);
    var oldValue = GetCookiesValue(ProjectID);
    GetCValue = GetCValue.replace(oldValue, cookVal);
    setCookie("shopcar", GetCValue, 1, "/");
    sumProject();
}

//公用方法

//选择项目时根据项目ID获得文本框输入值
function GetNumByproject(projectID) {
    var Numbers; //保存数量
    var NumInput = "txt" + projectID;       //项目数量输入框
    Numbers = document.getElementById(NumInput).value.replace(/\s+/g, "");
    if (isNaN(Numbers)) {
        Numbers = "0";
    }
    return Numbers;
}
//将 id|数量分离 只返回id
function GetProjectID(sourceValue) {
    var varIDs = "";
    if (sourceValue.indexOf(",") > 0) {
        var arryValue = sourceValue.split(",");
        for (var i = 0; i < arryValue.length; i++) {
            if (arryValue[i] != "") {
                varIDs = varIDs + arryValue[i].split("|")[0] + ",";
            }
        }
    } else {
        var arryValue = sourceValue.split("|");
        varIDs = arryValue[0];
    }
    return varIDs;
}
//通过项目ID从cookies中获得数量
function GetCount(varstring) {
    var GetCValue = getCookieValue("shopcar");
    var start = GetCValue.indexOf(varstring);
    var end = GetCValue.indexOf(",", start);
    var str;
    if (end != -1) {
        str = GetCValue.substring(start + 39, end);
    } else {
        str = GetCValue.substring(start + 39);
    }
    return str;
}
//通过项目id 获得 id|数量，
function GetCookiesValue(projectID) {
    var GetCValue = getCookieValue("shopcar");
    var start = GetCValue.indexOf(projectID);
    var end = GetCValue.indexOf(",", start);
    var str;
    if (end != -1) {
        str = GetCValue.substring(start, end + 1);
    } else {
        str = GetCValue.substring(start);
    }
    return str;
}
//计算合计
function sumProject() {
    var sum = 0;
    var temp;
    var tempValue;
    $("#ShopConnect tr").each(function (index) {
        temp = $(this).children("td");
        tempValue = parseFloat(temp.eq(2).html(), 10) * parseFloat(temp.eq(3).html());
        if (!isNaN(tempValue)) {
            sum = sum + tempValue;
        }
    });
    $("#shopsum").html(sum);
    $("#txtTotal").val(sum);
}

//用于个人链接

//保存获得保存信息和类型
function funSaveLink() {

    var lurl = $("#js_sug-url").val();
    var sign = $("#Linksign").val();
    // alert(sign);
    var ids = $("#linkid").val();
    var PostData = { name: $("#js_sug-name").val(), linkurl: lurl, type: sign, id: ids };
    GetNewLink(PostData);
}
//获得修改后的信息
function GetNewLink(PostData) {
    var url = "GetLink.ashx";
    $.ajax({
        cache: "False",
        type: "POST",
        async: false,
        url: url,
        data: PostData,
        success: function (counct) {
            if (counct == "SessionTimeout") {
                IsReLogin();
            }
            else {
                $(".linct_content").html(counct); $("#Linksign").val("add");
                $("#linkid").val("");
            }
        },
        error: function (xhr, ajaxOptions, thrownError)
        { alert("网络异常，稍后重试！"); return false; }
    });
}
//编辑
function fedit(id) {
    var url = $(id).parent("li").attr("data-url");
    var Name = $(id).parent("li").find("span").attr("title");
    $("#js_sug-name").val(Name);
    $("#js_sug-url").val(url);
    var Linkid = $(id).attr("dataid");
    $("#Linksign").val("edit");
    $("#linkid").val(Linkid);
}
//删除
function fLinkDel(id) {
    var Linkid = $(id).attr("dataid");

    $("#Linksign").val("delted");
    $("#linkid").val(Linkid);
    funSaveLink();
}
function showLinkPage(obj) {
    var url = $(obj).parents().attr("data-url");
    // alert(url);
    var name = 'newwindow' + Math.round();
    window.open(url, name, "", "");
}
function showEdit() {
    $("#Linksign").val("editview");
    funSaveLink();
}

//显示
function funtxt5(inputid) {
    var varinput = $("#" + inputid);

    //var letfs = varinput.offset().left;
    //var varWith = varinput.width();
    var hights = varinput.offset().top;
    $("#Linksign").val("view");
    var width = document.body.offsetWidth;
    $(".linkwindow").css("right", (width - 800) / 2);
    $(".linkwindow").css("top", hights + 64);
    $(".linkwindow").toggle().animate({ marginTop: "25px" }, 250, function () {  //回调函数控制   
        $(".linkwindow").animate({ marginTop: "-25px" }, 250);
    });
    //        }).animate({ marginTop: "-14px" }, 250, function () {  //回调函数控制   
    //            $(".linkwindow").animate({ marginTop: "-10px" }, 250);
    //var springSpeed = 1500; // 动画速度
    // varinput.toggle(function () {
    //    $('.linkwindow').animate({ marginTop: (hights) }, springSpeed, 'easeOutBounce');
    ////    }, function () {
    ////        $('.linkwindow').animate({ marginTop: -(hights + 64) }, springSpeed, 'easeOutBounce');
    ////    });

    //  });
    funSaveLink();
}

function showLinkView() {
    $("#Linksign").val("view");
    funSaveLink();
}

function reminder(inputid) {
    var varinput = $("#" + inputid);
    //var letfs = varinput.offset().left;
    var hights = varinput.offset().top;
    var width = document.body.offsetWidth;
    $(".reminderpage").css("left", (width - 800) / 2);
    $(".reminderpage").css("top", hights + 50);
    var url = "GetContact.ashx";
    $.ajax({
        cache: "False",
        type: "POST",
        async: false,
        url: url,
        success: function (counct) {
            if (counct == "SessionTimeout") {
                IsReLogin();
            }
            else {
                $("#remindercontainer").html(counct);
                $(".reminderpage").show();
            }
        },
        error: function (xhr, ajaxOptions, thrownError)
        { alert("网络异常，稍后重试！"); return false; }
    });
}

function orderView(orderID) {
    //location = "../View/Order/OrderView.aspx?orderID=" + orderID;
    //window.open("../View/Order/OrderView.aspx?orderID=" + orderID, "", "top=150px,left=200px,height=480px,width=800px");
}
function changeAll() {
    if ($("#checkAll").attr("checked")) {
        $("#checkCDS").attr("checked", 'true');
        $("#checkCamera").attr("checked", 'true');
        $("#checkGoods").attr("checked", 'true');
    }
    else {
        $("#checkCDS").removeAttr("checked");
        $("#checkCamera").removeAttr("checked");
        $("#checkGoods").removeAttr("checked");
    }
}

function closediv() {
    $(".contentpage").slideUp(); $("#contentcontainer").html("");
}

function PopBox(Poptype, obj) {
    //$(".contenttitle").click(function () { $(".contentpage").slideUp(); $("#contentcontainer").html(""); });
    $(".contentpage").css("right", -7);
    $(".contentpage").css("top", 36);
    if (Poptype == "1") {
        $(".contentpage").css("top", -6);
        $(".contentpage").css("width", 800);
        $("#contentcontainer").load('../View/Order/OrderView.aspx?orderID=' + obj + ' #orderview');
    }
    else if (Poptype == "2") {
        var PostData = { type: 'contact', id: obj };
        GetReminder(PostData);
        $(".contentpage").css("width", 450);
    }
    else if (Poptype == "3") {
        var PostData = { type: 'payment', id: obj };
        GetReminder(PostData);
        $(".contentpage").css("width", 450);
    }
    else if (Poptype == "4") {
        var PostData = { type: 'goods', id: obj };
        GetReminder(PostData);
        $(".contentpage").css("width", 450);
        if ($.browser.msie) {
            $('input:checkbox').click(function () {
                this.blur();
                this.focus();
            });
        }
    }
    $(".contentpage").show();
}


function GetReminder(PostData) {
    var url = "../View/GetReminder.ashx";
    $.ajax({
        cache: "False",
        type: "POST",
        async: false,
        url: url,
        data: PostData,
        success: function (counct) {
            if (counct == "SessionTimeout") {
                IsReLogin();
            }
            $("#contentcontainer").html(counct);
        },
        error: function (xhr, ajaxOptions, thrownError)
        { alert("网络异常，稍后重试！"); return false; }
    });
}

function SaveContact() {
    var orderID = $("#contactOrderID").val();
    var customerID = $("#contactCustomerID").val();
    var neirong = $("#neirong").val();
    var beizhu = $("#beizhu").val();
    var PostData = { type: 'savecontact', id: orderID, customer: customerID, contactcontent: neirong, remark: beizhu };
    SaveReminder(PostData);
}

function SavePayment() {
    var orderID = $("#paymentOrderID").val();
    var paymoney = $("#textPayment").val();
    var beizhu = $("#textRemark").val();
    var PostData = { type: 'savepayment', id: orderID, money: paymoney, remark: beizhu };
    SaveReminder(PostData);
}

function SaveGoods() {
    var orderID = $("#goodsOrderID").val();
    var checkCDS = 0, checkCamera = 0, checkGoods = 0;
    if ($("#checkCDS").attr("checked")) {
        checkCDS = 1
    }
    if ($("#checkCamera").attr("checked")) {
        checkCamera = 1;
    }
    if ($("#checkGoods").attr("checked")) {
        checkGoods = 1;
    }
    var PostData = { type: 'savegoods', id: orderID, CDS: checkCDS, Camera: checkCamera, Goods: checkGoods };
    SaveReminder(PostData);
}

function SaveReminder(PostData) {
    var url = "../View/GetReminder.ashx";
    $.ajax({
        cache: "False",
        type: "POST",
        async: false,
        url: url,
        data: PostData,
        success: function () {
            $(".contentpage").slideUp();
            var url = "GetContact.ashx";
            $.ajax({
                cache: "False",
                type: "POST",
                async: false,
                url: url,
                success: function (counct) {
                    $("#remindercontainer").html(counct);
                    $(".reminderpage").show();
                },
                error: function (xhr, ajaxOptions, thrownError)
                { alert("网络异常，稍后重试！"); return false; }
            });
            //alert("保存成功！")
            //$("#remindercontainer").load('../Login/WorkPlatform.aspx');
        },
        error: function (xhr, ajaxOptions, thrownError)
        { alert("网络异常，稍后重试！"); return false; }
    });
}

function IsReLogin() {
    var r = confirm("账号过期！是否重新登录？")
    if (r == true) {
        //top.location = 'Login.aspx';
        window.location.href = '../Login/Login.aspx';
    }
}